package com.majiang.majiang.util;

import com.majiang.majiang.domain.MaJiang;
import com.majiang.majiang.domain.MaJiangNumber;
import com.majiang.majiang.domain.MaJiangWind;

public class PrintUtil {
    public static void printMaJiang(MaJiang maJiang){
        int type = maJiang.getType();
        if (type <= 3) {
            //输出字牌
            MaJiangNumber maJiangNumber = (MaJiangNumber)maJiang;
            System.out.print(maJiangNumber + ",");
        }else {
            //输出风牌
            MaJiangWind maJiangWind = (MaJiangWind)maJiang;
            System.out.print(maJiangWind + ",");
        }
    }
}
